package servlets;

import javax.servlet.*;
import java.io.IOException;

public class SomeServlet implements Servlet {

    public SomeServlet() {

        System.out.println("创建SomeServlet实例");
    }

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {

        System.out.println("初始化SomeServlet实例");

    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("执行service()方法");
    }

    @Override
    public String getServletInfo() {
        return "Servlet的版本、Servlet的作者、Servlet所在的应用";
    }

    @Override
    public void destroy() {

        System.out.println("销毁SomeServlet实例");
    }
}
